<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>js的for循环</title>
</head>
<body>
<script>
    cars=["BMW","Volvo","Saab","Ford"];
    for(var i = 0;i < cars.length;i++){
        document.write(cars[i] + "<br>");
    }
</script>
</body>
</html>